﻿//=================================================================================================
// KBC Version: 	00.01.15
// Date:		2026/02/12
// Base:		v000114
//=================================================================================================
1. Added definition: PSENSOR_SUPPORT, for control P-Sensor function enabled/disabled.
   Modify PSENSOR_SUPPORT = 0.
2. Enabled PD patch bundle solution.
3. Fixed battery LED behavior when low-battery charging.
4. Delete BRI_BAT_ON = Low when S0 to MS.

//=================================================================================================
// KBC Version: 	00.01.14
// Date:		2025/12/04
// Base:		v000113
//=================================================================================================
1. Modify PMIC parameter.

//=================================================================================================
// KBC Version: 	00.01.13
// Date:		2025/11/12
// Base:		v000112
//=================================================================================================
1. Fixed CPU temperature = 0'C.
2. Fixed power LED issue.
3. Added flag for notify BIOS PD in PATCH mode.
     #define EcRam93								ECReg(ACPIRAM + 0x93)
     #define PD_IN_PATCH_MODE			BIT7	//1: PD in Patch mode
4. Added TwinheadCmd 0x89 for PD patch bundle.
     Para1   Para2   Para3   Para4 ~
     Channel Address DataLen Data1, ...

//=================================================================================================
// KBC Version: 	00.01.12
// Date:		2025/11/03
// Base:		v000111
//=================================================================================================
1. Fixed S0 to S5 issue(Power LED).

//=================================================================================================
// KBC Version: 	00.01.11
// Date:		2025/10/31
// Base:		v000110
//=================================================================================================
1. Modify EC_SLP_S0# DEBOUNCE_500MS.

//=================================================================================================
// KBC Version: 	00.01.10
// Date:		2025/10/22
// Base:		v000109
//=================================================================================================
1. Modify panel brightness in night vision mode <= 1.7 nits.
2. Fixed CPU temperature = 0'C
3. Fixed battery charging issue(Charging Voltage).

//=================================================================================================
// KBC Version: 	00.01.09
// Date:		2025/09/11
// Base:		v000108
//=================================================================================================
1. Disabled to auto power on after EC mirror.
2. Modify battery low-temperature control CPU_PROCHOT_EC pin.
3. Added TwinheadCmd 0x66 for switch panel backlight.

//=================================================================================================
// KBC Version: 	00.01.08
// Date:		2025/08/20
// Base:		v000107
//=================================================================================================
01. Fixed system on issue for PD adapter only and power under 60W.
02. Fixed low-temperature test issue.
03. Fixed power led issue.
04. Added function for BIOS security update.
05. Modify read CPU temperature function.
06. Modify Charging Current Limit.
07. Modify P-Sensor functions for SX-9324.
08. Modify GPIO definition.
    Function         GPIO
                  Old   New
    COPILOT_SW#   GPH7  GPJ5
    VOL_UP#       GPJ5  GPH7
09. Fixed BcTrig function issue(TRIIGER_IN).
10. Modify programmable button function:
   BUTTON          Addr    Value   Function
   PROG_1          0xAC    0x00    Disabled
                           0x01    Stealth_Mode
                           0x02    Night_Vision
                           0x03    Launch_App
   PROG_2          0xAB    0x00    Disabled
                           0x01    Touch_Screen
                           0x02    Launch_App
                           0x04    SAS_Key
   VOL_UP/DN       0xA7    0x00    Disabled
                           0x01    Brightness
                           0x02    Volume
   COPILOT(D)      0xAD    0x00    Disabled
                           0x01    Copilot
                           0x02    Launch_App
   TRIGGER_IN(P)   0xA8    0x00    Disabled
                           0x01    BC_Trigger
                           0x02    Launch_App
                           0x03    Camara

//=================================================================================================
// KBC Version: 	00.01.07
// Date:		2025/06/19
// Base:		v000106
//=================================================================================================
1. Config GPIO for Rev-B.
                     RA    ->    RB
   CPU_PROCHOT_EC E2(GPG0) -> J6(GPA5)
   TRIGGER_IN#      None   -> A9(GPH3)
2. Added TRIGGER_IN function.
   EC Ram Address 0xA8:
   0x00: Disabled
   0x01: BcTrig
3. Modify TRIGGER_IN function.
   BcTrig assert/deassert changed from HW trigger to Q Event.
4. Disabled to check battery temperature in Pmc2Cmd 0x63.

//=================================================================================================
// KBC Version: 	00.01.06
// Date:		2025/05/19
// Base:		v000105
//=================================================================================================
1. Added PMC2Cmd(0x63) to notify booting phase in low temperature.
2. Power LED flash when battery temperature < -20'C.
3. Assert NightVision Pin when battery temperature < -25'C.

//=================================================================================================
// KBC Version: 	00.01.05
// Date:		2025/04/18
// Base:		v000104
//=================================================================================================
1. Modify panel brightness in night vision mode <= 1.7 nits.
2. Modify CPU fan table.

//=================================================================================================
// KBC Version: 	00.01.04
// Date:		2025/03/21
// Base:		v000103
//=================================================================================================
1. Modify OOB write Psys PL4.
          Psys Psys
           PL1  PL2  PL3  PL4
   AC      48W  60W  62W  65W
   Battery 32W  40W  42W  65W
2. Deleted SET_DEVICE_ON_EE when S0 for EE test.
3. Modify PROG_2 button function.
   #define Prog2KeyFunctionMode                ECReg(ACPIRAM + 0xAB)
   #define PROG2KEY_MODE_Disable           0x00
   #define PROG2KEY_MODE_Touch             0x01
   #define PROG2KEY_MODE_LaunchApp         0x02
   #define PROG2KEY_MODE_BcTrig            0x03
   #define PROG2KEY_MODE_SASkey            0x04
   #define PROG2KEY_MODE_CAMERA_FUN        0x05
4. Modify COPILOT button function.
   #define CopilotBtnFunctionMode              ECReg(ACPIRAM + 0xAD)
   #define COPILOTBTN_MODE_Disable         0x00
   #define COPILOTBTN_MODE_Copilot         0x01
   #define COPILOTBTN_MODE_LaunchApp       0x02
5. Add SCI_COPILOT_BTN_PROGRAMMABLE_FUN_EVT_CMD Event 0xDC.
6. Modify PD port stop power-sharing when PD adapter only.
7. Fixed VOL_DN button issue.

//=================================================================================================
// KBC Version: 	00.01.03
// Date:		2025/03/03
// Base:		v000102
//=================================================================================================
1. Added device all on when S5 to S0 for EE test.
   S5toS0forEEtest_SUPPORT = 1.
2. Set PD_CONNECTER_MAX = 1.
3. Check battery exist or not in PD power-sharing function.

//=================================================================================================
// KBC Version: 	00.01.02
// Date:		2025/02/27
// Base:		v000101
//=================================================================================================
1. Fixed PMIC initial read/write issue.

//=================================================================================================
// KBC Version: 	00.01.01
// Date:		2025/02/18
// Base:		v00010504_S14G3
//=================================================================================================
1. Based on AMI ITE5571 ver:F code base and "202412311_S14G3_ADL_TwinHead_00010504".
2. Config EC GPIO.
3. Enabled TMR function. (IT5571-F -> IT5571VG-C)
4. Disabled second-battery function.
5. Enabled bridge-battery function.
6. Fixed EC sleep before PD power sharing switch.
7. Added PECI over eSPI functions.
8. Disabled PECI module.
9. Added power management IC initial function.
10. Declared programmable-button behavior in Pre-OS(UEFI Mode).
11. Added copilot programmable button function.
12. Enabled BC attach & control.
13. Config charger IC.